package com.ericsson.enap.modules.cdr.job;

import com.ericsson.common.quartz.job.MainJob;
import com.ericsson.common.quartz.job.ManualQuartzJob;
import com.ericsson.common.quartz.service.QuartzTableManager;
import com.ericsson.enap.modules.cdr.task.ImsOriginalCdrDownLoadTask;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * IMS原始话单备份下载
 * @author yanghai
 */
@Component
public class ImsOriginalCdrDownLoadJob implements MainJob {
    @Autowired
    QuartzTableManager quartzTableManager;
    @Autowired
    ImsOriginalCdrDownLoadTask imsOriginalCdrDownLoadTask;
    String jobName="imsOriginalCdrDownLoadJob";
    @Override
    public void doTask() {
        System.out.println("ImsOriginalCdrDownLoadJob start.....");
        //imsOriginalCdrDownLoadTask.execute();
        quartzTableManager.addManualTaskJob(jobName,jobName,jobName,jobName, ManualQuartzJob.class,"0 00 4 * * ?",imsOriginalCdrDownLoadTask);
    }
}
